#include "xLog.h"
#include <map>
#include <sys/stat.h>
#include <unistd.h>
namespace XLog
{
    void XLogger::addXLogOutput(XLogOutputLocationBase* output)
    {
        this->vecOutLocat.push_back(output);
    }

    void XLogger::out(const XLogEvent* event,XLogFormat* format)
    {
        if(format == nullptr)
        {
            return ;
        }
        //log level ctrl out
        if(event->level >= this->level)
        {
            for(auto it=vecOutLocat.begin();it != vecOutLocat.end(); ++it)
            {
                (*it)->out(event,format);
            }    
        }
    }

}